package com.youyi.yyviewsdklibrary;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

public class MyItemDecoration extends RecyclerView.ItemDecoration {
    int space;

    public MyItemDecoration(int i) {
        this.space = i;
    }

    @Override // android.support.v7.widget.RecyclerView.ItemDecoration
    public void getItemOffsets(Rect rect, View view, RecyclerView recyclerView, RecyclerView.State state) {
        super.getItemOffsets(rect, view, recyclerView, state);
        rect.left = this.space;
        rect.right = this.space;
        rect.bottom = this.space;
        rect.top = this.space;
    }
}
